package com.ccys.db.mapper;

import com.ccys.db.entity.TblPurchaseOrderDetail;
import com.ccys.db.vo.doctor.doctorConsultStage.CheckPurchaseOrder;
import com.ccys.db.vo.doctor.doctorConsultStage.ProductExpireInTimeVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.Date;
import java.util.List;

/**
* Created by Mybatis Generator on 2023/12/12
*/
public interface TblPurchaseOrderDetailMapper extends Mapper<TblPurchaseOrderDetail>, MySqlMapper<TblPurchaseOrderDetail> {

    /**
     * 查询6个月内过期的记录
     */
    List<ProductExpireInTimeVo> selectExpireInTimeList(@Param("productId")String productId,@Param("endDate")String endDate);

    List<CheckPurchaseOrder> findCheckByProductIdAndByCurrentTime(@Param("lastProductIds") List<String> lastProductIds,@Param("date") Date date);

    //查询过期
    List<CheckPurchaseOrder> findCheckExpireByProductIdAndCurrentTime(@Param("lastProductIds") List<String> lastProductIds,@Param("date") Date date);
}